package top.kaoshanji.p1ch07a;

/**
 * 代码清单-p1ch07a-153页a：演示private关键字
 * author kaoshanji
 * ^_^
 * create time 2025/3/9 10:45
 */
public class IceCream {

    public static void main(String[] args) {
        //- Sundae x = new Sundae(); // 并不访问
        Sundae x = Sundae.makeASundae();
    }

}

class Sundae {
    private Sundae() {}
    static Sundae makeASundae() {
        return new Sundae();
    }
}
